home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Info channel v3.1.adf / ARexx / ARexx.doc < prev    next >
Text File  |  1991-07-19  |  14KB  |  494 lines

  1.  
  2.  
  3.  
  4. InfoChannel ARexx documentation
  5. -------------------------------
  6.  
  7. With InfoChannel version 3.1, you can control the InfoPlayer directly
  8. via an ARexx message port.  The InfoPlayer can thus be used as a
  9. "graphics engine" or "output device" by other programs, whether it be
  10. ARexx programs or programs written in other languages.  For instance,
  11. the ARexx directory on th InfoChannel program disk file contains a
  12. sample ARexx program that displays a list of all files in a directory
  13. (like the CLI "DIR" command), using a InfoChannel Background,
  14. InfoChannel Fonts, and InfoChannel text transitions.
  15.  
  16. To use InfoChannel via ARexx, the player needs to be started in a
  17. special ARexx mode.  Please make sure that the InfoChannel main program
  18. is not running.
  19.  
  20. Issue the following CLI command:
  21.  
  22.     run InfoPlayer -arexx
  23.  
  24.  
  25. The port name to use is:
  26.  
  27.     rexx_VISUAL
  28.  
  29. that is, you need to issue the ARexx command
  30.  
  31.     address 'rexx_VISUAL'
  32.  
  33. before you send ARexx commands to InfoPlayer.
  34.  
  35.  
  36.  
  37. The InfoPlayer Arexx commands
  38. ------------------------------
  39.  
  40. The ARexx commands supported by InfoPlayer are very similiar to the
  41. commands in InfoChannel's own scripting language, VISUAL.  Typically,
  42. you would want to create nice-looking screens for your ARexx
  43. application.  This is easy to do in InfoChannel.  Once you have designed
  44. the pages, you may save them as a normal InfoChannel script, and
  45. translate the script to ARexx.  For instance, you could have each page
  46. as a ARexx subroutine, and call the subroutines from your program.
  47.  
  48. The main difference between ARexx programs and VISUAL scripts is that
  49. ARexx is an interpreted language, while VISUAL is compiled to an
  50. internal format when you load the script.  VISUAL scripts describe
  51. events and their interconnections, while ARexx programs cause some
  52. immediate action to be taken each time a command is executed.  Therfore,
  53. there is no EVENT...END command in ARexx.  The following example
  54. illustrates how to display a page of text with ARexx:
  55.  
  56.  
  57.  
  58. address 'rexx_VISUAL'                    /* Name of InfoPlayers ARexx port */
  59.  
  60. BLANK 640 512 3 lace hires 7                   /* Use a blank picture */
  61. PALETTE 000 FFE 06D 287 223 A00 C52 334        /* Choose color palette */
  62. FONT "GoudyB.font" 48                          /* Typeface */
  63. COLOR 6 0 4 2 3 0 0                            /* Text colors */
  64. ATTRIBUTES shadow                              /* Text attributes */
  65. STYLE 0 3 4 3 6 2 1 37 5 1 20 0 5              /* Text style parameters */
  66. TEXT 30 30 '"Welcome to InfoChannel!"' 33 0 2  /* Display text with wipe #33 */
  67. FONT "GoudyB.font" 23                          /* Use smalle font size */
  68. COLOR 1 0 4 2 3 0 0                      
  69. STYLE 0 3 4 3 6 2 1 19 3 1 20 0 5
  70. ATTRIBUTES italics
  71. TEXT 30 111 '"What is InfoChannel?"'
  72. ATTRIBUTES none
  73. TEXT 30 167 '"InfoChannel is used for video titling"'
  74. TEXT 30 195 '"and presentations, as well as interactive"'
  75. TEXT 30 223 '"and educational applications."'
  76. TEXT 30 279 '"InfoChannel is used by professionals like teachers,"'
  77. TEXT 30 307 '"presenters and video  producers because it"'
  78. TEXT 30 335 '"is the fastest graphics display engine on the "'
  79. TEXT 30 363 '"Amiga. It''s elegant user interface makes it"'
  80. TEXT 30 391 '"quick, fun and easy to  create powerful"'
  81. TEXT 30 419 '"presentations.  "'
  82.  
  83. /* At this point, the page is set up and ready to be displayed. 
  84.    However, nothing is displayed until a SHOW commando is issued: */
  85.  
  86. SHOW 
  87.  
  88. PAUSE 3   /* Show the picture for 3 seconds */
  89.  
  90. SHOW OFF  /* SHOW OFF removes the picture */
  91.  
  92. /* The following command will quit the InfoPlayer.  It is not
  93.    possible to send ARexx commands to InfoPlayer after the QUIT
  94.    command */
  95. QUIT      
  96.  
  97.  
  98.  
  99. For more examples of how to control InfoPlayer via ARexx, see the ARexx
  100. directory on the InfoChannel program disk.
  101.  
  102.  
  103.  
  104. Alphabetical list of commands
  105. -----------------------------
  106.  
  107. 3D ON | OFF  [DIR num] [LENGTH num]
  108.  
  109.         The 3D command controls the 3D attribute for texts.
  110.  
  111.         Examples:
  112.             3D ON       /* Switch on 3D */
  113.             3D OFF      /* Switch off 3D */
  114.             3D DIR 2    /* Set 3D direction */
  115.             3D LENGTH 6 /* Set 3D length */
  116.  
  117.         The 3D command can also be used to read the current 3D setting.
  118.         
  119.  
  120. 3DCOLOR num num
  121.  
  122.         The 3DCOLOR command sets or reads the colors used for 
  123.         the 3D text attribute
  124.         
  125.         Example:
  126.             3DCOLOR 2 3 /* Use color #2 and 3 for 3D */
  127.  
  128.  
  129. ANIM name loops speed
  130.  
  131.         The ANIM command controls playback of animation files.  
  132.         Playback starts when the SHOW command is issued.
  133.  
  134.         Example:
  135.             AMIM Work:Animations/InfoChannel.anim
  136.  
  137.  
  138. AACOLOR color
  139.         The AACOLOR command defines which color to antialias to.
  140.         This color can be any RGB value (see the PALETTE command
  141.         below for an explanation of RGB values).
  142.         
  143.         Example:
  144.             AACOLOR 000   /* Antialias to black */
  145.             AACOLOR 777   /* Antialias to gray */       
  146.  
  147.  
  148. ANTIALIAS level
  149.  
  150.         The ANTIALIAS command sets or read the ANTIALIAS LEVEL
  151.         for texts and brushes.  Level 0 is no antialiasing, 
  152.         and level 1, 2 and 3 use 1, 2 adn 3 colors for antialiasing,
  153.         respectively.
  154.  
  155.         Example:
  156.             ANTIALIAS 3
  157.  
  158.  
  159.  
  160. ATTRIBUTES NONE | UNDERLINE | BOLD | ITALICS | 3D | SHADOW | EDGE
  161.              | TEXTURE | STRECH | EMBOSS | JAMTRANS | ANTIALIAS
  162.              | REMAP
  163.  
  164.         The ATTRIBUTES command sets or reads which text attributes
  165.         are to be used by the TEXT and BRUSH commands.
  166.         
  167.         Examples:
  168.             ATTRIBUTES Italics
  169.             ATTRIBUTES Shadow Edge
  170.             ATTRIBUTES Underline 3d
  171.             ATTRIBUTES none
  172.  
  173.  
  174. BLANK width height depth HIRES | LACE [backcolor]
  175.  
  176.         The BLANK command defines a blank background to be used
  177.         for texting.  The background is not displayed until
  178.         a SHOW command is issued.
  179.         
  180.         Examples:
  181.             BLANK 640 512 4 hires lace 0 /* Hires interl. PAL, 16 colors */
  182.             BLANK 320 200 5 3  /* Lores NTSC, 32 colors, backgr.col. #3 */
  183.             
  184.         
  185.  
  186. BOLD ON | OFF  [size]
  187.  
  188.         The BOLD command controls the BOLD attribute for texts.
  189.  
  190.         Examples:
  191.             BOLD ON     /* Switch on BOLD */
  192.             BOLD OFF    /* Switch off BOLD */
  193.             BOLD 2      /* Set BOLD size*/
  194.  
  195.         The BOLD command can also be used to read the current bold 
  196.     setting.
  197.  
  198.  
  199. BRUSH x y filename [wipe pause speed] [FIRST | LAST]
  200.  
  201.         The BRUSH command defines an IFF brush file to be displayed.
  202.         The X and Y parameters specify the position on the screen.
  203.         Optionally, you may specify a wipe number, wipe speed and 
  204.         pause for the brush.  Refer to the VISUAL section in the
  205.         manual for a complete list of wipe numbers.  The LAST flag
  206.         allows you to make the brush appear on the last frame of
  207.         an animation.
  208.         
  209.         Examples:
  210.             BRUSH 100 50 work:symbols/logo
  211.             BRUSH 100 50 work:symbols/logo 22 0 5
  212.             BRUSH 100 50 work:symbols/logo 22 0 5 LAST
  213.  
  214.         
  215.  
  216. BUTTON num x1 y1 x2 y2  NONE | COMPLEMENT
  217.  
  218.         The BUTTON command lets you define areas on the screen  
  219.         that can be selected with the mouse or a joystick, just
  220.         like InfoChannel's interactive buttons.  You can have up to
  221.         99 buttons on one page, with optional highlighting.
  222.         The 'num' parameter is a unique number from 1-99 of your
  223.         choice to identify this button.  X1, Y1, X2, Y2 define the
  224.         top left corner and right bottom corner of the button area
  225.         on the screen.  The COMPLEMENT flag selects complement
  226.         highlighting.
  227.         
  228.         Examples:
  229.             BUTTON 1 100 50 10 70 complement
  230.             BUTTON 16 100 50 10 70 none
  231.  
  232.         To actually use the buttons, you need to enable either
  233.         mouse or joystick input with "MOUSE on" or "JOYSTICK on".
  234.         You can get the number of the last selected button by issuing
  235.         a BUTTON command with no parameters.
  236.  
  237.  
  238. COLOR text edge shadow 3D1 3d2 jam inactive
  239.  
  240.         The COLOR command combines the TEXTCOLOR, EDGECOLOR, 3DCOLOR,
  241.         and INACTIVECOLOR comands into one command.
  242.         
  243.         Example:
  244.             COLOR 1 0 0 7 8 0 2
  245.  
  246.  
  247. CYCLE ON | OFF
  248.  
  249.         Enable or disable color cycling on a picture.
  250.  
  251.         Example:
  252.             CYCLE on
  253.  
  254.  
  255. EDGE ON | OFF [size]
  256.  
  257.         The EDGE command controls the outline attribute for texts.
  258.  
  259.         Examples:
  260.             EDGE ON     /* Switch on outline*/
  261.             EDGE OFF    /* Switch off outline*/
  262.             EDGE 2      /* Set outline size*/
  263.  
  264.         The EDGE command can also be used to read the current outline 
  265.     setting.
  266.  
  267.  
  268.  
  269. EDGECOLOR num
  270.  
  271.         The EDGECOLOR command sets or reads the color used for 
  272.         the EDGE (outline) text attribute
  273.         
  274.         Example:
  275.             EDGECOLOR 2 /* Use color #2 for outline */
  276.  
  277.  
  278.  
  279. FONT    name size
  280.  
  281.         The FONT command selects a typeface for text output.
  282.         
  283.         Example:
  284.             FONT Gill.font 96
  285.         
  286.  
  287.  
  288. INACTIVE ON | OFF
  289.  
  290.         The INACTIVE command controls the INACTIVE attribute for texts.
  291.  
  292.         Examples:
  293.             INACTIVE ON   /* Switch on INACTIVE */
  294.             INACTIVE OFF  /* Switch off INACTIVE */
  295.  
  296.         The INACTIVE command can also be used to read the current 
  297.         inactive setting.
  298.  
  299.  
  300. INACTIVECOLOR num
  301.  
  302.         The INACTIVECOLOR command sets or reads the color used for 
  303.         the INACTIVE text attribute
  304.         
  305.         Example:
  306.             INACTIVECOLOR 2 /* Use color #2 for inactive */
  307.  
  308.  
  309. ITALICS ON | OFF [level]
  310.  
  311.         The ITALICS command controls the ITALICS attribute for texts.
  312.  
  313.         Examples:
  314.             ITALICS ON  /* Switch on ITALICS */
  315.             ITALICS OFF /* Switch off ITALICS */
  316.             ITALICS 2   /* Set ITALICS size*/
  317.  
  318.         The ITALICS command can also be used to read the current italics
  319.         setting.
  320.  
  321.  
  322.  
  323. JOYSTICK ON | OFF
  324.  
  325.         The JOYSTICK command enables or disables a joystick in port 2
  326.         for controlling buttons.
  327.  
  328.  
  329. MOUSE ON | OFF
  330.  
  331.         The MOUSE command enables or disables the mouse for controlling
  332.         buttons.
  333.  
  334.  
  335. PALETTE color1 ... colorN
  336.  
  337.         Set color palette for a picture.  The colors are defined by 
  338.         three-digit hexadecimal numbers.  The first digit is the RED
  339.         component, the second is GREEN and the third is BLUE.
  340.         
  341.         Example:
  342.             PALETTE 000 fff bbb 777 222 fc2 00c 123
  343.  
  344.  
  345. PAUSE seconds
  346.  
  347.         Wait for a number of seconds.
  348.         
  349.         Example:
  350.             PAUSE 5
  351.  
  352.  
  353. PICTURE filename
  354.  
  355.         Select an IFF picture file for background.  The picture is not
  356.         displayed until a SHOW command is issued.
  357.         
  358.         Example:
  359.             PICTURE work:InfoChannel/backgrounds/Texture001
  360.  
  361.  
  362. QUIT
  363.         The QUIT command quits the InfoPlayer; the current screen
  364.         (if any) will be closed, and the ARexx message port is removed.
  365.  
  366.  
  367. REMAP ON | OFF
  368.  
  369.         The REMAP command sets or reads the REMAP attribute for
  370.         texts and brushes.  Color remapping is used for color fonts and
  371.         brushes.
  372.  
  373.  
  374.  
  375. SHADOW ON | OFF  [DIR num] [LENGTH num]
  376.  
  377.         The SHADOW command controls the SHADOW attribute for texts.
  378.  
  379.         Examples:
  380.             SHADOW ON       /* Switch on SHADOW */
  381.             SHADOW OFF      /* Switch off SHADOW */
  382.             SHADOW DIR 2    /* Set SHADOW direction */
  383.             SHADOW LENGTH 6 /* Set SHADOW length */
  384.  
  385.         The SHADOW command can also be used to read the current SHADOW
  386.         setting.
  387.  
  388.  
  389. SHADOWCOLOR num
  390.  
  391.         The SHADOWCOLOR command sets or reads the color used for 
  392.         the SHADOW text attribute
  393.         
  394.         Example:
  395.             SHADOWCOLOR 0 /* Use color #0 for SHADOW */
  396.  
  397.  
  398. SHOW [OFF]
  399.  
  400.         The SHOW command displays a page that has previously been
  401.         set up with background, text, transitions etc.  SHOW OFF
  402.         closes the current screen.
  403.  
  404.  
  405. SPACING num
  406.  
  407.         The SPACING commands sets or reads character spacing.
  408.  
  409.         Example:
  410.             SPACING 2
  411.  
  412.  
  413. STYLE dummy shadow_dir shadow_len 3d_dir 3d_len edge_size
  414.       bold_size under_pos under_size under_air italics spacing
  415.       
  416.         The STYLE command lets you set or read text rendering 
  417.         parameters.
  418.         
  419.         Example:
  420.             STYLE 0 3 4 3 6 2 1 19 3 1 20 0 5
  421.  
  422.         
  423.  
  424. TEXT    x y text [wipe pause speed] [FIRST | LAST]
  425.  
  426.         The TEXT command defines a text to be displayed.
  427.         The X and Y parameters specify the position on the screen.
  428.         Optionally, you may specify a wipe number, wipe speed and 
  429.         pause for the text.  Refer to the VISUAL section in the
  430.         manual for a complete list of wipe numbers.  The LAST flag
  431.         allows you to make the brush appear on the last frame of
  432.         an animation.
  433.         
  434.         Examples:
  435.             TEXT 100 50 Text
  436.             TEXT 100 50 '"This is some text"' 22 0 5
  437.             TEXT 100 50 '"This is some text"' 22 0 5 LAST
  438.  
  439.  
  440.  
  441. TEXTCOLOR num
  442.  
  443.         The TEXTCOLOR command sets or reads the front color used for 
  444.         text.
  445.         
  446.         Example:
  447.             TEXTCOLOR 1 /* Use color #1 for text */
  448.  
  449.  
  450.  
  451. UNDERLINE ON | OFF  [POS num] [SIZE num] [AIR num]
  452.  
  453.         The UNDERLINE command controls the UNDERLINE attribute for texts.
  454.  
  455.         Examples:
  456.             UNDERLINE ON   /* Switch on UNDERLINE */
  457.             UNDERLINE OFF  /* Switch off UNDERLINE */
  458.             UNDERLINE POS 2 SIZE 4 /* Set UNDERLINE position & size*/
  459.  
  460.         The UNDERLINE command can also be used to read the current
  461.         underline setting.
  462.  
  463.  
  464. WIPE wipe speed
  465.  
  466.         The wipe command specifies a transition for the picture.
  467.         This transition will be used when the next SHOW command is
  468.         executed.  Refer to the VISUAL section in the manual for a
  469.         complete list of wipe numbers.
  470.  
  471.         Examples:
  472.             WIPE 1      /* Cut */
  473.             WIPE 2 5    /* Fade with speed 5 */
  474.  
  475.  
  476.  
  477. Results 
  478. -------
  479.  
  480. The InfoPlayer sets the following ARexx variables:
  481.  
  482. RC              -- Error level, 0 = no error.
  483.  
  484. SCALA.LASTERROR -- Error message if RC > 0
  485.  
  486. RESULT          -- Return value (if "OPTIONS RESULTS" has been enabled)
  487.  
  488.  
  489. Most commands return a result if they are issued with no arguments.
  490. For instance, the BUTTON command with no arguments returns the number
  491. of the last button pressed in RESULT.
  492.  
  493.  
  494.